namespace go favorite
include "../cmd/video/video.thrift"

struct FavoriteActionRequest {
    1: required i64 user_id,         // 用户id
    2: required string token,        // 用户鉴权token
    3: required i64 video_id,        // 视频id
    4: required i32 action_type,     // 1-点赞，2-取消点赞
}

struct FavoriteActionResponse {
    1: required i32 status_code,     // 状态码，0-成功，其他值-失败
    2: optional string status_msg,   // 返回状态描述
}

struct FavoriteListRequest {
    1: required i64 user_id,         // 用户id
    2: required string token,        // 用户鉴权token
}

struct FavoriteListResponse {
    1: required i32 status_code,     // 状态码，0-成功，其他值-失败
    2: optional string status_msg,   // 返回状态描述
    3: required list<video.Video> video_list, // 用户点赞视频列表
}

service FavoriteService {
    FavoriteActionResponse FavoriteAction(1:required FavoriteActionRequest request),
    FavoriteListResponse FavoriteList(1:required FavoriteListRequest request),
}
